const path = require('path')
const resolve = dir => path.join(__dirname, dir)
const fs = require('fs')
const webpack = require('webpack')
module.exports = {
  publicPath: './',
  runtimeCompiler: true,
  // 配置路径别名
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components/'))
      .set('_as', resolve('src/assets/img/')),
      config.plugin('provide').use(webpack.ProvidePlugin, [{
        'window.Quill': 'quill/dist/quill.js',
        'Quill': 'quill/dist/quill.js'
      }])
  },

  devServer: {
    port: 8080 // 端口号配置
  },
  // 传递第三方插件选项
  pluginOptions: {
    'AMap': 'AMap'
  },

}